<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    {{info}}
    <input type="button" value="按钮1" v-on:click="f()">
    <input type="button" value="按钮2" @click="f()">
    <input type="text" v-model="msg">
    <input type="button" value="弹出文本框内容" @click="f1()">
</div>


<script src="js/vue.min.js"></script>
<script>
    let v = new Vue({
        el: "body>div",
        data: {
            info: '事件绑定',
            msg: ""
        },
        methods: {
            f() {
                alert("按钮被点击了")
            },
            f1() {
                alert(v.msg)
            }
        }
    })
</script>
</body>

</html>